package com.gyh.listeners;

import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

//@Component
public class ListenersTest {
    private final String id = "22";
    @RabbitListener(queues = "user."+id+".queue")
    public void test(String msg){
        System.out.println("监听到的消息为"+msg);
    }

}
